<?php
require_once('classes/config.inc.php');
require_once(DIR_CLASS. 'Session.php');
include(DIR_CLASS. 'TemplateParser.php');

$session = new UserSession();
$session->open();

if($session->check())
	$menu = "<a href=\"profile.php\">Profil</a> / <a href=\"login.php?act=logout\">Logga ut</a>[". substr($session->getEmail(),0,12) ."] / <a href=\"sitemap.php\">Karta &ouml;ver hemsidan</a>";
else
	$menu = "<a href=\"register.php\">Registrera dig</a> / <a href=\"login.php\">Logga in</a> / <a href=\"sitemap.php\">Karta &ouml;ver hemsidan</a>";
	
$template_array = array(
	"MENU" => $menu
);
	
$template = new TemplateParser();
$template->loadfile("templates/info.tpl");
$template->assignVars($template_array);
$template->output();
?>